-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expanding adaptivity to non-BodyFittedTriangulation triangulations #868
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #868 +/- ##
==========================================
+ Coverage 88.56% 88.57% +0.01%
==========================================
Files 172 172
Lines 19994 20035 +41
==========================================
+ Hits 17707 17746 +39
- Misses 2287 2289 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Let me just point here that in HOWEVER, the one in |
@amartinhuertas Here are some thoughts: Let's consider we have two In vanilla Gridap, we can change domain between the two trians iff This means that if # Coarse to Fine
v_Ωc = interpolate(sol,Vc)
aux = Triangulation(ReferenceFE{num_cell_dims(Ωc)},get_adapted_model(Λf))
v_Ωf = change_domain(v_Ωc.plus,aux,ReferenceDomain())
v_Λf = change_domain(v_Ωf,Λf,ReferenceDomain())
# Fine to Coarse
v_Ωf = interpolate(sol,Vf)
aux = Triangulation(ReferenceFE{num_cell_dims(Ωf)},get_background_model(Λc))
v_Ωc = change_domain(v_Ωf.plus,aux,ReferenceDomain())
v_Λc = change_domain(v_Ωc,Λc,ReferenceDomain()) In this example, Ω is cell-wise and Λ is a skeleton (but would work for any other facet-wise triangulation). I would say this could work for any In the case of model portions, I think we could do something similar by taking the already implemented concept of So the only case we are not covering is when |
@JordiManyer ... thanks for sharing your thoughts. I think that the first thing we (at least I) would need in order to move forward is to (try to) fully understand how the Do you think it might be possible to come up with an internal comprehensive note that fully details, for all possible scenarios (e.g., all possible combinations of I think it would help to write a code snippet where all the cases are covered, and do some debugging to understand the underlying processes and help writing the explanations for each case. Let us start with a very simple case. For example, in the following comment:
Before asking ourselves these kind of questions I think we should ask ourselves what do we want/need to do (e.g., by writing high level API snippets of scenarios we will have to deal with). This would lead to the appropriate questions. The facet triangulations we are interested in, i.e., |
As far as I can see, we have:
Also, the only definitions of |
Ok, thanks for the update. I see, e.g., the following definition: function get_glue(trian::SkeletonTriangulation,::Val{D},::Val{D}) where D
plus = get_glue(trian.plus,Val(D))
minus = get_glue(trian.minus,Val(D))
SkeletonPair(plus,minus)
end which does not actually return a Given that a single data type covers quite a lot of scenarios, I think it may happen that its three member variables may have different semantics depending on context. Can we come up with an explanation of the semantics of each On the other hand:
BodyFittedTriangulation does not actually contain a FaceToFaceGlue instance. (not a big deal, I understand what you mean)
Is there any relationship among both glues?
Ok ... you refer to the following definition:
Do you understand the underlying rationale? Which is the meaning of the two dimensions that are passed to the most general |
Yeah sorry, that was an over-simplification. In any case, the SkeletonPair returned contains two |
The idea is that when we call A)
B)
C) The same can be said for D) Views: As already mentioned above, what happens with views is that |
Be careful here. There is a more general version of get_glue in which there are to Val-type arguments, not just one, right? Does it mean that, in the most general scenario, we may end having three different values for D? get_glue(trian::Triangulation{D1},Val{D2},Val{D3}) where {D1,D2,D3} I am trying to understand ... |
Ok. So we have to deal with the topological dimension of triangulation faces ( |
I think the bulk of the work is done! I have also added some tests for the cases that work, which are
I also need to set new |
@amartinhuertas I believe this is now ready to be reviewed. The case where the source and target trians are face-based (Skeleton-Skeleton, Boundary-Boundary, etc...) is quite complex and I don't think that it can be treated in general. The reason is that some fine edges do not belong to the coarse grid, which poses the question of how to extrapolate the coarse cellfield into those edges when going from coarse to fine fields. Dealing with this could very well be FE method-dependent, i.e by using static condensation for HDG or simple extrapolation in other cases. In any case, it is probably better to leave it for future work. |
The recent commit d6a53e3 is related to this issue. |
In PR #838 we decided to limit the inter-grid
change_domain
capabilities toBodyFittedTriangulations
. However, we would like to expand Adaptivity to other types ofTriangulation
, notablyBoundaryTriangulation
andSkeletonTriangulation
(which will be needed for hybrid discretisations).This is the roadmap towards implementing these goals:
AdaptivityGlues
which contain adaptivity information on all facet dimensions. We should modify ourrefine
implementation forCartesianDiscreteModel
to fill all facet information. This will allow us to test new features as we add them. EDIT: We have decided NOT to implement this for now (see comments in the PR).Triangulation
subtypes in a general way is to somehow find a way to couple theAdaptivityGlue
with Gridap's triangulation glue. Then, two triangulationsT1
andT2
are compatible iffget_glue(T1)
andget_glue(T2)
can be matched using theAdaptivityGlue
between their two background models.